package com.lyc.kotlin.wanandroid.utils

import android.content.Context
import android.net.ConnectivityManager

/**
 * 描述
 *liuyucheng
 * Created By 刘育成 on 2019/7/30.
 */
class NetWorkUtil {
    companion object{
        fun isNetworkConnected(context: Context) :Boolean{
            val manager=context.applicationContext.getSystemService(Context.CONNECTIVITY_SERVICE) as ConnectivityManager
            val info=manager.activeNetworkInfo
            return !(info==null || !info.isConnected)
        }
    }
}